| Example Program Gotohs Algorithm Gotoh alignment code example This code example illustrates a graph-based Gotoh alignment
1 | #include <seqan/graph_align.h>
| 2 | #include <iostream>
| 3 |
| 4 | using namespace seqan;
| 5 |
| 6 | int main() {
| 7 | typedef String<char> TString;
| 8 | typedef StringSet<TString, Dependent<> > TStringSet;
| 9 | typedef Graph<Alignment<TStringSet, void> > TGraph;
|
10 | TStringSet str;
| 11 | TString str0("TarfieldandGarfieldarestupid.");appendValue(str, str0);
| 12 | TString str1("Garfield");appendValue(str, str1);
|
13 | Score<int> score_type = Score<int>(2,-1,-1,-4);
|
15 | int score = globalAlignment(g, score_type, Gotoh());
|
16 | std::cout << "Scoring schema: Match=2, Mismatch=-1, Gap-extension=-1, Gap-opening=-4" << std::endl;
| 17 | std::cout << g << std::endl;
| 18 | std::cout << "Score: " << score << std::endl;
|
19 | AlignConfig<true,false,false,true> ac;
|
20 | int score2 = globalAlignment(g, score_type, ac, Gotoh() );
|
21 | std::cout << g << std::endl;
| 22 | std::cout << "Score with ends free-space alignment: " << score2 << std::endl;
| 23 | return 0;
| 24 | }
|
|